<template>
    <div class="cells3">
        <div class="item" v-for="(item,index) in cells3" :key="index">
            <div class="item-top">
                <img :src="item.top" alt="">
            </div>
            <div class="item-contents">
                <div class="item-exposure" v-for="(item1,index1) in item.contents" :key="index1">
                    <div class="img">
                        <img :src="item1.imgsrc" alt="">
                    </div>
                    <div class="info-box">
                        <div class="text">
                            <div class="name">{{item1.name}}</div>
                            <div class="brief">{{item1.brief}}</div>
                            <div class="price">
                                <span>￥{{item1.newPrice}}</span>
                                <span class="price old" v-if="item1.oldPrice"><s>￥{{item1.oldPrice}}</s></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name:"Cells3",
    props:["cells3"]
}
</script>

<style lang="less" scoped>
.cells3{
    width: 7.2rem;
    .item{
        .item-top{
            width: 100%;
        }
        .item-contents{
            width:100%;
            display: flex;
            flex-wrap: wrap;
            box-sizing: border-box;
            justify-content: space-between;
            padding: 0 .12rem;
            background: rgb(240, 241, 243);
            padding-bottom: 0.16rem;
            .item-exposure{
                width: 2.21rem;
                border-radius: .06rem;
                overflow: hidden;
                .img{
                    position: relative;
                    overflow: hidden;
                }
                .info-box{
                    height: auto;
                    padding: .2rem .1rem;
                    text-align: center;
                    overflow: hidden;
                    color:#000;
                    .name{
                        font-size: .24rem;
                        padding: 0 .12rem;
                        font-weight: bolder;
                        color: #3c3c3c;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }
                    .brief{
                        font-size: .2rem;
                        line-height: 1.6em;
                        color: #3c3c3c;
                        height: 1.5em;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        margin-top: .06rem;
                    }
                    .price{
                        font-size: .28rem;
                        color: #ea625b;
                        height: 1.5em;
                        line-height: 1.5em;
                        position: relative;
                        display: inline-block;
                        .old{
                            display: inline-block;
                            margin: 0 .1rem;
                            font-size: .22rem;
                            color: rgba(0,0,0,.54);
                            s{
                                text-decoration: line-through;
                            }
                        }
                    }
                }
            }
        }
        img{
            width: 100%;
        }
    }
}
</style>